home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 June / PersonalComputerWorld-June2009-CoverdiscCD.iso / Software / Freeware / Adobe AIR 1.5.1 / AdobeAIRInstaller.exe / setup.swf / scripts / mx / containers / ApplicationControlBar.as next >
Encoding:
Text File  |  2009-02-12  |  1.9 KB  |  74 lines

  1. package mx.containers
  2. {
  3.    import flash.events.Event;
  4.    import mx.core.Application;
  5.    import mx.core.mx_internal;
  6.    import mx.styles.IStyleClient;
  7.    
  8.    use namespace mx_internal;
  9.    
  10.    public class ApplicationControlBar extends ControlBar
  11.    {
  12.       mx_internal static const VERSION:String = "3.0.0.0";
  13.       
  14.       private var dockChanged:Boolean = false;
  15.       
  16.       private var _dock:Boolean = false;
  17.       
  18.       public function ApplicationControlBar()
  19.       {
  20.          super();
  21.       }
  22.       
  23.       public function set dock(param1:Boolean) : void
  24.       {
  25.          if(_dock != param1)
  26.          {
  27.             _dock = param1;
  28.             dockChanged = true;
  29.             invalidateProperties();
  30.             dispatchEvent(new Event("dockChanged"));
  31.          }
  32.       }
  33.       
  34.       public function resetDock(param1:Boolean) : void
  35.       {
  36.          _dock = !param1;
  37.          dock = param1;
  38.       }
  39.       
  40.       [Bindable("dockChanged")]
  41.       public function get dock() : Boolean
  42.       {
  43.          return _dock;
  44.       }
  45.       
  46.       override protected function commitProperties() : void
  47.       {
  48.          super.commitProperties();
  49.          if(dockChanged)
  50.          {
  51.             dockChanged = false;
  52.             if(parent is Application)
  53.             {
  54.                Application(parent).mx_internal::dockControlBar(this,_dock);
  55.             }
  56.          }
  57.       }
  58.       
  59.       override public function set enabled(param1:Boolean) : void
  60.       {
  61.          var _loc2_:Object = mx_internal::blocker;
  62.          super.enabled = param1;
  63.          if(Boolean(mx_internal::blocker) && mx_internal::blocker != _loc2_)
  64.          {
  65.             if(mx_internal::blocker is IStyleClient)
  66.             {
  67.                IStyleClient(mx_internal::blocker).setStyle("borderStyle","applicationControlBar");
  68.             }
  69.          }
  70.       }
  71.    }
  72. }
  73.  
  74.